import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Department.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
import Page6 from './views/nav3/Page6.vue'
import echarts from './views/charts/echarts.vue'
import emp from './views/nav1/Employee.vue'
import Permission from "./views/nav1/Permission";
import Role from "./views/nav1/Role";
import Menu from "./views/nav1/Menu";
import noper from './views/403.vue'
import config from './views/nav1/Config';
import Dictionary from "./views/nav1/Dictionary";
import Dictionaryitem from "./views/nav1/Dictionaryitem";


let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },

    {
        path: '/',
        component: Home,
        name: '首页',
        leaf: true,
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/echarts', component: echarts, name: '首页' }
        ]
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '管理',
        iconCls: 'fa fa-id-card-o',//图标样式classfa fa-id-card-o  el-icon-message
        children: [
            { path: '/department', component: Main, name: '主页', hidden: true },
            // { path: '/table', component: Table, name: '部门管理' },
            // { path: '/emp', component: emp, name: '员工管理' },
            { path: '/permission', component: Permission, name: '权限管理' },
            { path: '/role', component: Role, name: '角色管理' },
            { path: '/menu', component: Menu, name: '菜单管理' },
            { path: '/noper', component: noper, name: "" ,hidden: true},

        ]
    },
    {
        path: '/',
        component: Home,
        name: '组织机构',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/table', component: Table, name: '部门管理' },
            { path: '/emp', component: emp, name: '员工管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '数据字典',
        iconCls: 'fa fa-address-card',
        // leaf: true,//只有一个节点
        children: [
            { path: '/config', component: config, name: '系统配置' },
            { path: '/dict', component: Dictionary, name: '数据字典' },
            { path: '/dictitem', component: Dictionaryitem, name: '数据明细' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;